<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; utf-8">
<title>部门列表</title>
</head>
<script type="text/javascript">
	function deleteStuffs() {
		//提交form
		document.stuffForm.action = "${pageContext.request.contextPath }/stuff/deleteStuffs.action";
		document.stuffForm.submit();
	}
	function queryStuffs(idStuffdepartment) {
		document.stuffForm.action = "${pageContext.request.contextPath }/stuff/queryStuffByDepartment.action?idStuffdepartment="+idStuffdepartment;
		document.stuffForm.submit();
	}
</script>
<body>
	当前用户：${username }
	<c:if test="${username!=null }">
		<a href="${pageContext.request.contextPath }/user/logout.action">退出</a>
	</c:if>

	<form name="stuffForm" method="post">
		<c:forEach items="${departments }" var="department">
			<input type="button" value="${department.name }"
				onclick="queryStuffs(${department.idStuffdepartment })"></input>
		</c:forEach>
		</td>
	</form>
</body>
</html>